POV-Ray : Newsgroups : povray.newusers : Vertex Colors in POVRay : Re: Vertex Colors in POVRay Server Time
5 Sep 2024 12:22:15 EDT (-0400)
  Re: Vertex Colors in POVRay  
From: Josh English
Date: 21 Dec 2000 11:01:27
Message: <3A42297A.742D4538@spiritone.com>
It isn't possible with Polygons, but Chris Colefax has a tri-color
triangle include file:

http://www.geocities.com/SiliconValley/Lakes/1434/otherincludes.html

So you would have to create a simple macro to take the polygon points
and create a group of these triangles to get it to work. I have never
worked with it myself, but based on the rest of Chris's stuff, it should
be fairly straightforward.

Josh

Sam No Spam wrote:

> I am seeking a way to specify per-vertex colors in a polygon mesh in
> POVRay.  In OpenGL I'd do it with something like
>
>                 glBegin( GL_POLYGON );
>
>                 for ( p = p0; p < p1; p++ ) {
>
>                     glColor4f( v_red[p],        // red
>                                v_green[p],      // green
>                                v_blue[p],       // blue
>                                1.0 );           // alpha
>                     glNormal3f( vnx[p], vny[p], vnz[p] );
>                     glVertex3f( x[p], y[p], z[p] );
>
>                 }
>
>                 glEnd();
>
> Clues, RTFMs, and suggestions are all welcome.
>
> Please remove the "-nospam" from the Reply-To: address if responding
> directly.
>
> Thanx.
>
>                                                         spl

--
Josh English -- Lexiphanic Lethomaniac
eng### [at] spiritonecom
The POV-Ray Cyclopedia http://www.spiritone.com/~english/cyclopedia/


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.